#ifndef FAVORITELIB_H
#define FAVORITELIB_H

#include <QObject>
#include <QList>
#include <QPair>
class FavoriteLib : public QObject
{
    Q_OBJECT
public:
    static FavoriteLib* getInstance();
    void addFavorite(QString senderoc,QString content,QString datetime);
    QList<QPair<QPair<QString, QString>, QString> > getList();
    void clearFavorite();
signals:
    void s_favoriteLoadDone();
public slots:
    void recvFavorite(QList<QPair<QPair<QString,QString>,QString>>);
private:
    FavoriteLib()=default;
    FavoriteLib& operator=(const FavoriteLib&)=delete;
    FavoriteLib(const FavoriteLib&)=delete;
    static FavoriteLib* favoritelib;
    QList<QPair<QPair<QString,QString>,QString>> favoritelist;

};
#endif // FAVORITELIB_H
